package com.team.ai.mapper;

import com.team.ai.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface UserMapper {

//增
    int insert(String name,String password,int gender,String email,String phone,String nickName,String avatar);
//删
    int deleteByPrimaryKey(int id);
//改
    int update(String name,String phone,String email,int gender,String nickName,String remark,int id);
    boolean updatepwd(int userId,String password);
    int addAvatar(int id,String avatar);
   //查
   User selectByPrimaryKey(int id);

    User selectByName(String name);

    User selectByPhone(String phone);
    List<User> selectPage(HashMap map);
//用户登录
    User login(String name,String password);

}
